<?php
require_once("../wandchart.inc.php");

$wd = new wandChart();

# 设置参数
$wd->setSize(610, 300);
$wd->setCoord("RIGHT");
$wd->images_dir = "../images";
$wd->fonts_dir = "../fonts";
$wd->canvas = "wandchart-610x300.png";
$wd->setTitle("y=sin(x) 图像");
$wd->setLabel("x", "y");

$wd->prepareCanvas();

# 生成和分析数据
$x = $wd->makeX("-4:0.1:4");
$y = $wd->makeY("sin(<x>)", $x);

# 绘图部分
$wd->plot($x, $y, "BOX", "red");

$wd->outputChart();
?>
